package com.java.base.exercise.designmode.guanchazhe;

import lombok.extern.slf4j.Slf4j;

import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @Author RenPu
 * @Date 2021/12/16 11:37
 * @Version 1.0
 * @Description:
 **/

@Slf4j
public class LotteryServiceImpl implements LotteryService {

    MinibusTargetServiceV1 e =new MinibusTargetServiceV1();


    @Override
    public LotteryResult doDraw(String userid) {
        String lottery = e.lottery(userid);

        //调用MQ发消息推送
        System.out.println("调用MQ发消息推送---------------");
        //调用短信发消息推送
        System.out.println("调用短信发消息推送---------------");

        return new LotteryResult(userid,lottery,new Date());
    }
}
